home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 162 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.0 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: "Eugene Radchenko" <eugene@qsar.chem.msu.su>
  3. Newsgroups: comp.std.c++
  4. Subject: Are all Windows programs ill-formed?
  5. Date: 29 Jan 1996 10:52:19 PST
  6. Organization: Lab. of Org.Synth., MSU
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <AE5J83na99@qsar.chem.msu.su>
  9. NNTP-Posting-Host: isolde.mti.sgi.com
  10. X-Original-Date: Mon, 29 Jan 1996 11:26:45 +0300 (MSK)
  11. X-Mailer: dMail [Demos Mail for DOS v1.23]
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBVAwUBMQ0Xhky4NqrwXLNJAQFPNAH/Q8p+GPpZgJpgilN2HL0TrW5CrL1rwtIP
  14.     UC+vTb7O2hFhDJHlEcTcsnbCHWWPG+VHX4HWGsVKWKIAt8fWCO/3Mw==
  15.     =ZSnR
  16. Originator: austern@isolde.mti.sgi.com
  17.  
  18. Hi!
  19. I have just realized that something is grossly overlooked in C++ standard.
  20. It requires every program to have the main() function (which implementation
  21. is not allowed to supply) with parameters (void) or (int argc, int*argv[]).
  22. However, Windows programs have another convention: prrogram must contain
  23. the function
  24.   int WinMain(HINSTANCE curInst, HINSTANCE prevInst, LPSTR cmdline, int cmdShow)
  25. Some of this is of course quirks or even outright ignored in Win32
  26. (prevInst), but the full non-parsed command line could be useful sometimes,
  27. and not all implementations provide the function retrieving it. And anyway
  28. this is definitely not a main() from the specs. Maybe the requirements on
  29. the main() should be relaxed somehow?
  30.  
  31.                 Best regards                     Genie
  32.  
  33. --
  34. --------------------------------------------------------------------
  35. Eugene V. Radchenko           Research associate, Computer Chemistry
  36. E-mail: eugene@qsar.chem.msu.su                Fax: +7-(095)939-0290 
  37. Ordinary mail:  Chair of Organic Chemistry, Department of Chemistry,
  38.                       Moscow State University, 119899 Moscow, Russia
  39. *****************  Disappearances are deceptive  *******************
  40. ---
  41. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  42.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  43.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  44.